package kp.rpc.registry;

import kp.rpc.config.RegistryConfig;
import kp.rpc.model.ServiceMetaInfo;

import java.util.List;

public interface Registry {
    /**
     * @description: 服务注册
     */
    void register(ServiceMetaInfo serviceMetaInfo) throws Exception;

    /**
     * @description: 服务下线
     */
    void unRegister(ServiceMetaInfo serviceMetaInfo);

    /**
     * @description: 服务初始化
     */
    void init(RegistryConfig registryConfig);

    /**
     * @description: 服务销毁
     */
    void destroy();

    /**
     * @description: 服务发现
     */

    List<ServiceMetaInfo> serviceDiscovery(String serviceKey);

    void healthCheck();

    /**
     * @description: 服务监听
     */
    void watch(String serviceNodeKey);

}
